/**
 * 
 */
package com.feib.stms.service.impl;


import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.feib.stms.dao.TempUserDao;
import com.feib.stms.model.TempUser;
import com.feib.stms.pagination.PaginatedList;
import com.feib.stms.service.TempUserService;

/**
 * @author Lion Gao
 *
 */
@Service("tempUserService")
public class TempUserServiceImpl extends BaseServiceImpl implements TempUserService 
{
	private static final long serialVersionUID = 8647168765522835279L;

	@Resource(name="userTempDao")
	private TempUserDao userDao;

	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#countTempUserId(java.lang.String, java.lang.Long)
	 */
	public int countTempUserId(String userId,Long groupPk) {
		return userDao.countTempUserId(userId,groupPk);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#countTempUserId(java.lang.Long, java.lang.String, java.lang.Long)
	 */
	public int countTempUserId(Long userPk, String userId,Long groupPk) {
		return userDao.countTempUserId(userPk, userId,groupPk);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#findByTempUerPk(java.lang.Long)
	 */
	public TempUser findByTempUerPk(Long userPk) {
		return userDao.getByTempUserPk(userPk);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#saveTempUser(com.feib.stms.model.TempUser)
	 */
	public int saveTempUser(TempUser user) {
		return userDao.insertTempUser(user);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#updateTempUser(com.feib.stms.model.TempUser)
	 */
	public int updateTempUser(TempUser user) {
		return userDao.updateTempUser(user);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#findByTempUerId(java.lang.String, java.lang.Long)
	 */
	public TempUser findByTempUerId(String userId,Long groupPk) {
		return userDao.getByTempUserId(userId,groupPk);
	}

	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#queryByTempUser(com.feib.stms.model.TempUser, com.feib.stms.pagination.PaginatedList)
	 */
	public PaginatedList<TempUser> queryByTempUser(TempUser tempUser, PaginatedList<TempUser> paginationConfig) {
		return this.userDao.queryForPaginatedListByTempUser(tempUser, paginationConfig);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.feib.stms.service.TempUserService#findTempUserCount(java.lang.String, java.lang.String, java.lang.Long)
	 */
	public int findTempUserCount(String userId, String password , Long groupPk) {
		return this.userDao.getTempUserCount(userId, password, groupPk);
	}
	
}
